Fix missing materialized column for hudi table#5119
Merged
dirtysalt merged 3 commits intoStarRocks:mainfrom Apr 18, 2022
Merged
Fix missing materialized column for hudi table#5119dirtysalt merged 3 commits intoStarRocks:mainfrom
dirtysalt merged 3 commits intoStarRocks:mainfrom
Conversation
dirtysalt
reviewed
Apr 15, 2022
| return scanColumns.size() != 0 && !((LogicalHiveScanOperator) scanOperator).getPartitionColumns().containsAll( | ||
| scanColumns.stream().map(ColumnRefOperator::getName).collect(Collectors.toList())); | ||
| } | ||
| if (scanOperator instanceof LogicalHudiScanOperator) { |
Contributor
There was a problem hiding this comment.
We definitely need our DLA new framework to not let this duplicated code exist.
Contributor
Author
There was a problem hiding this comment.
Yes, it is necessary and more abstract operaters should be extracted to decouple from concrete table properties.
Make a rough refinement about this here, PTAL
Contributor
There was a problem hiding this comment.
We definitely need our DLA new framework to not let this duplicated code exist.
that's true we should have a common prune rule which call api of connectors
dirtysalt
previously approved these changes
Apr 15, 2022
imay
previously approved these changes
Apr 15, 2022
Contributor
Author
|
run starrocks_fe_unittest |
1 similar comment
Contributor
Author
|
run starrocks_fe_unittest |
caneGuy
reviewed
Apr 18, 2022
| private boolean containsMaterializedColumn(LogicalScanOperator scanOperator, Set<ColumnRefOperator> scanColumns) { | ||
| if (scanOperator instanceof LogicalHiveScanOperator) { | ||
| return scanColumns.size() != 0 && !((LogicalHiveScanOperator) scanOperator).getPartitionColumns().containsAll( | ||
| if (scanOperator instanceof LogicalHiveScanOperator || scanOperator instanceof LogicalHudiScanOperator) { |
Contributor
There was a problem hiding this comment.
no need to add this check logic
| if (scanOperator instanceof LogicalHudiScanOperator) { | ||
| // Hudi partition columns is not materialized column, so except partition columns | ||
| return ((LogicalHudiScanOperator) scanOperator).getPartitionColumns().contains(columnName); | ||
| if (scanOperator instanceof LogicalHiveScanOperator || scanOperator instanceof LogicalHudiScanOperator) { |
...e/src/main/java/com/starrocks/sql/optimizer/rule/transformation/PruneHDFSScanColumnRule.java
Show resolved
Hide resolved
dirtysalt
approved these changes
Apr 18, 2022
Contributor
Author
|
@Mergifyio backport branch-2.2 |
mergify bot
pushed a commit
that referenced
this pull request
Apr 19, 2022
(cherry picked from commit e12dea3)
Contributor
✅ Backports have been createdDetails
|
Collaborator
[FE PR Coverage check]😍 pass : 7 / 7 (100.00%) file detail
|
caneGuy
pushed a commit
that referenced
this pull request
Apr 19, 2022
blackstar-baba
pushed a commit
to blackstar-baba/starrocks
that referenced
this pull request
Apr 28, 2022
ABingHuang
pushed a commit
to ABingHuang/starrocks
that referenced
this pull request
Apr 29, 2022
imay
pushed a commit
that referenced
this pull request
Nov 15, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this:
Which issues of this PR fixes :
Closes #4753
Problem Summary(Required) :
Fix the wrong result when partition columns exists in
wherestatements